{% extends "base.html" %}

{% block icons %} {% endblock %}   

{% block title %} Bayanihan: Reports Detail {% endblock %}

{% block menu %}{% endblock %} 

{% block css %} 
	<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/forms.css" />
{% endblock %}

{% block js %}
    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.js"></script>
{% endblock %}

{% block content %}
    <div id="error_message">
        {% if error_message %}
            {{ error_message }}
        {% endif %}   
        
    </div>
	<div id="form">
        <form method="post" action="/login/"> {% csrf_token %}
            <h2>Login</h2>
            <div class="report_row">
                <h4>Username</h4>
                <input type="text" name="username" />
            </div>
            <div class="report_row">
                <h4>Password</h4>
                <input type="password" name="password" />
            </div>
            <div class="report_row">
                <input class ="btn_submit" type="submit" name="submit" value="Submit"></input>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        {% if error_message %}
            {% if username %}
                $("#error_message").css('display', 'block');
                $("input[name='username']").addClass('errorField');
                $("input[name='password']").addClass('errorField');
            {% endif %}  
            
            $("input[name='username']").attr('value', '{{username}}');
        {% endif %}  
    </script>
{% endblock %}